package sal.demo;

import java.io.IOException;

import javax.servlet.jsp.PageContext;

import net.sourceforge.krama.tag.TAjaxView;
import net.sourceforge.krama.tag.TView;
import net.sourceforge.krama.tag.panel.TGlobalPanel;
import net.sourceforge.krama.tag.widget.TLabel;


public class ViewAjax extends TAjaxView {

	public String start(Object obj, PageContext context) throws IOException,
	IllegalArgumentException {
		
		TGlobalPanel panel = new TGlobalPanel(context, "mondiv3");
		
		TLabel label = new TLabel();
		label.setName("malabel3");
		label.setSize("50px");
		
		Operation t = (Operation) (obj);
		
		label.setText(String.valueOf(t.getResultat()));

		panel.add(label);
		return panel.show();
	}
}
